This tutorial shows how to disable line wrapping.
As you change width of the Code area XCode automatically breaks the line which is called line wrapping.
If you want to keep the content in the same line you can to disable this feature.
XCode
Preferences
Text Editing
Line Wrapping
Wrap lines to editor width: OFF
With line wrapping Without line wrapping
Wrap lines to editor width: OFF